using UnityEngine;
using StarseekerStuff;

public class Core : MonoBehaviour
{
  //  private ExampleUI exampleUI;

    void Start() 
    {
        Debug.Log("DEMOCRACKY ONLINE");
        ButtonAsset lazyA = new ButtonBuilder("lazy")
            .SetName("Spawn Lazy")
            .SetDescription("My loveee!!!")
            .SetTab("spawning")
            .SetIcon(ModUtils.LoadSprite("DemocrackyBox", "buttons/LazyIcon"))
            .SetType(CoolButton.ButtonType.Godpower)
            .SetGodpowerId("godpower_lazy")
            .Build();

        AssetManager.Instance.buttons.Add(lazyA);

        ButtonAsset breadcatA = new ButtonBuilder("breadcat")
            .SetName("Spawn Bread Cat")
            .SetDescription("mr potato")
            .SetTab("spawning")
            .SetIcon(ModUtils.LoadSprite("DemocrackyBox", "buttons/BreadCatIcon"))
            .SetType(CoolButton.ButtonType.Godpower)
            .SetGodpowerId("godpower_breadcat")
            .Build();

        AssetManager.Instance.buttons.Add(breadcatA);

        ButtonAsset hdvortexA = new ButtonBuilder("hdvortex")
            .SetName("Spawn HD Vortex")
            .SetDescription("THE democracky rests in him.")
            .SetTab("spawning")
            .SetIcon(ModUtils.LoadSprite("DemocrackyBox", "buttons/HDVortexIcon"))
            .SetType(CoolButton.ButtonType.Godpower)
            .SetGodpowerId("godpower_hdvortex")
            .Build();

        AssetManager.Instance.buttons.Add(hdvortexA);

        ButtonAsset yapperA = new ButtonBuilder("yapper")
            .SetName("Spawn Professional Yapper")
            .SetDescription("ON EVERYTHING.")
            .SetTab("spawning")
            .SetIcon(ModUtils.LoadSprite("DemocrackyBox", "buttons/ProfessionalYapperIcon"))
            .SetType(CoolButton.ButtonType.Godpower)
            .SetGodpowerId("godpower_yapper")
            .Build();

        AssetManager.Instance.buttons.Add(yapperA);

        ButtonAsset smellA = new ButtonBuilder("smell")
            .SetName("Spawn I can smell you")
            .SetDescription("My favorite degenerate.")
            .SetTab("spawning")
            .SetIcon(ModUtils.LoadSprite("DemocrackyBox", "buttons/SmellIcon"))
            .SetType(CoolButton.ButtonType.Godpower)
            .SetGodpowerId("godpower_smell")
            .Build();

        AssetManager.Instance.buttons.Add(smellA);

        ButtonAsset newpeanutA = new ButtonBuilder("newpeanut")
            .SetName("Spawn New Peanut")
            .SetDescription("The sequel!")
            .SetTab("spawning")
            .SetIcon(ModUtils.LoadSprite("DemocrackyBox", "buttons/NewPeanutIcon"))
            .SetType(CoolButton.ButtonType.Godpower)
            .SetGodpowerId("godpower_newpeanut")
            .Build();

        AssetManager.Instance.buttons.Add(newpeanutA);

        GodpowerAsset lazyB = new GodpowerBuilder("godpower_lazy")
            .SetName("Summon Lazy")
            .SetDescription("Spawns Lazy at the target location.")
            .SetAction((pos, tile, power) =>
            {
                ActionLibrary.SpawnActor("lazy", pos);
            })
            .Build();

        AssetManager.Instance.powers.Add(lazyB);

        GodpowerAsset breadcatB = new GodpowerBuilder("godpower_breadcat")
            .SetName("Summon Bread Cat")
            .SetDescription("Spawns Bread Cat at the target location.")
            .SetAction((pos, tile, power) =>
            {
                ActionLibrary.SpawnActor("breadcat", pos);
            })
            .Build();

        AssetManager.Instance.powers.Add(breadcatB);

        GodpowerAsset hdvortexB = new GodpowerBuilder("godpower_hdvortex")
            .SetName("Summon HD Vortex")
            .SetDescription("Spawns HD Vortex at the target location.")
            .SetAction((pos, tile, power) =>
            {
                ActionLibrary.SpawnActor("hdvortex", pos);
            })
            .Build();

        AssetManager.Instance.powers.Add(hdvortexB);

        GodpowerAsset yapperB = new GodpowerBuilder("godpower_yapper")
            .SetName("Summon Professional Yapper")
            .SetDescription("Spawns Professional Yapper at the target location.")
            .SetAction((pos, tile, power) =>
            {
                ActionLibrary.SpawnActor("professionalyapper", pos);
            })
            .Build();

        AssetManager.Instance.powers.Add(yapperB);

        GodpowerAsset smellB = new GodpowerBuilder("godpower_smell")
            .SetName("Summon I can smell you")
            .SetDescription("Spawns I can smell you at the target location.")
            .SetAction((pos, tile, power) =>
            {
                ActionLibrary.SpawnActor("smell", pos);
            })
            .Build();

        AssetManager.Instance.powers.Add(smellB);

        GodpowerAsset newpeanutB = new GodpowerBuilder("godpower_newpeanut")
            .SetName("Summon New Peanut")
            .SetDescription("Spawns New Peanut at the target location.")
            .SetAction((pos, tile, power) =>
            {
                ActionLibrary.SpawnActor("newpeanut", pos);
            })
            .Build();

        AssetManager.Instance.powers.Add(newpeanutB);

        ActorAsset lazyC = new ActorBuilder("lazy")
            .SetName("Lazy")
            .SetStat("health", 80)
            .SetStat("speed", 4f)
            .SetStat("vision_range", 5f)
            .SetStat("attack_range", 1.1f)
            .SetStat("attack_damage", 18)
            .SetSprite(ModUtils.LoadSprite("DemocrackyBox", "actors/lazy/lazy"))
            .SetSizeID("human_size")
            .SetSpeciesID("meta_species")
            .AddBehavior(new CoreBehavior { AdultOnly = false })
            .AddBehavior(new WanderBehavior { roamRadius = 5f, AdultOnly = false })
            .Build();

        AssetManager.Instance.actors.Add(lazyC);

        ActorAsset breadcatC = new ActorBuilder("breadcat")
            .SetName("Bread Cat")
            .SetStat("health", 85)
            .SetStat("speed", 15f)
            .SetStat("vision_range", 5f)
            .SetStat("attack_range", 1.1f)
            .SetStat("attack_damage", 20)
            .SetSprite(ModUtils.LoadSprite("DemocrackyBox", "actors/breadcat/breadcat"))
            .SetSizeID("human_size")
            .SetSpeciesID("meta_species")
            .AddBehavior(new CoreBehavior { AdultOnly = false })
            .AddBehavior(new WanderBehavior { roamRadius = 5f, AdultOnly = false })
            .AddBehavior(new AggressiveWanderBehavior { roamRadius = 5f, AdultOnly = false })
            .Build();

        AssetManager.Instance.actors.Add(breadcatC);

        ActorAsset hdvortexC = new ActorBuilder("hdvortex")
            .SetName("HD Vortex")
            .SetStat("health", 75)
            .SetStat("speed", 4f)
            .SetStat("vision_range", 5f)
            .SetStat("attack_range", 1.1f)
            .SetStat("attack_damage", 40)
            .SetSprite(ModUtils.LoadSprite("DemocrackyBox", "actors/hdvortex/hdvortex"))
            .SetSizeID("human_size")
            .SetSpeciesID("meta_species")
            .AddBehavior(new CoreBehavior { AdultOnly = false })
            .AddBehavior(new WanderBehavior { roamRadius = 5f, AdultOnly = false })
            .Build();

        AssetManager.Instance.actors.Add(hdvortexC);

        ActorAsset yapperC = new ActorBuilder("professionalyapper")
            .SetName("Professional Yapper")
            .SetStat("health", 200)
            .SetStat("speed", 2f)
            .SetStat("vision_range", 5f)
            .SetStat("attack_range", 1.1f)
            .SetStat("attack_damage", 20)
            .SetSprite(ModUtils.LoadSprite("DemocrackyBox", "actors/professionalyapper/professionalyapper"))
            .SetSizeID("human_size")
            .SetSpeciesID("human_species")
            .AddBehavior(new CoreBehavior { AdultOnly = false })
            .AddBehavior(new ReproduceBehavior { detectionRange = 6f, AdultOnly = true })
            .AddBehavior(new WanderBehavior { roamRadius = 5f, AdultOnly = false })
            .AddBehavior(new ShitFuckTree { detectionRange = 40f, AdultOnly = true })
       //     .AddBehavior(new BabyBehavior { AdultOnly = false })
            .AddBehavior(new NationBehavior { AdultOnly = true })
            //   .AddBehavior(new DefensiveBehavior { AdultOnly = false })
            .AddBehavior(new ResourceGatherBehavior { detectionRange = 40f, AdultOnly = true })
            .Build();

        AssetManager.Instance.actors.Add(yapperC);

        ActorAsset smellC = new ActorBuilder("smell")
            .SetName("I can smell you")
            .SetStat("health", 200)
            .SetStat("speed", 6f)
            .SetStat("vision_range", 5f)
            .SetStat("attack_range", 1.8f)
            .SetStat("attack_damage", 100)
            .SetSprite(ModUtils.LoadSprite("DemocrackyBox", "actors/smell/smell"))
            .SetSizeID("human_size")
            .SetSpeciesID("meta_species")
            .AddBehavior(new CoreBehavior { AdultOnly = false })
            .AddBehavior(new WanderBehavior { roamRadius = 5f, AdultOnly = false })
            .Build();

        AssetManager.Instance.actors.Add(smellC);

        ActorAsset newpeanutC = new ActorBuilder("newpeanut")
            .SetName("New Peanut")
            .SetStat("health", 40)
            .SetStat("speed", 2f)
            .SetStat("vision_range", 5f)
            .SetStat("attack_range", 1.1f)
            .SetStat("attack_damage", 3)
            .SetSprite(ModUtils.LoadSprite("DemocrackyBox", "actors/newpeanut/newpeanut"))
            .SetSizeID("human_size")
            .SetSpeciesID("peanut_species")
            .AddBehavior(new CoreBehavior { AdultOnly = false })
            .AddBehavior(new ReproduceBehavior { detectionRange = 6f, AdultOnly = true })
            .AddBehavior(new WanderBehavior { roamRadius = 5f, AdultOnly = false })
            .Build();

        AssetManager.Instance.actors.Add(newpeanutC);

        SpeciesAsset lazyD = new SpeciesBuilder("meta_species")
            .SetName("Meta")
            .AddTrait("adult_age_3")
            .AddTrait("sex")
            .Build();

        AssetManager.Instance.species.Add(lazyD);

   //     exampleUI = gameObject.AddComponent<ExampleUI>();
    }
}